package sample 
{
	
	import org.abc.uiCore.list.AbcCP;
	import org.abc.interfaces.IVo;
	import flash.display.MovieClip;
	import flash.text.TextField;
	
	/**
	 * @描述
	 * @作者		Mr.zheng
	 * @版本		version 1.0
	 * @创建日期	2011-8-19 20:02
	 */
	public class ItemCP_CPS extends AbcCP
	{
		public var id_LEA:TextField;
		public var bg_LEA:MovieClip;
		
		public function ItemCP_CPS() 
		{
			super();
			
			//如果是凭空创建，没有在类外指定绑定对象，则，在这里绑定
			this.bindView(new hListCp_CPS);
			id_LEA.mouseEnabled = false; 
		} 
		override public function init():void{
			id_LEA.mouseEnabled = false;
		}
		override public function update(vo:IVo = null):void 
		{
			/** 将vo赋值给data */
			super.update(vo);
			
			if (data == null) return;
			id_LEA.text = data.data["id"];
			selected = data.selected;
		}
		override public function reInit():void 
		{
			super.reInit();
			id_LEA.text = "";
			selected = false;
		}
		override public function get selected():Boolean 
		{
			return super.selected;
			
		}
		
		override public function set selected(value:Boolean):void 
		{
			super.selected = value;
			if (value) {
				bg_LEA.gotoAndStop(2);
			}else {
				bg_LEA.gotoAndStop(1);
			}
		}
	}
}